<?php
class CropImagesController extends AppController {
	var $name = 'CropImage';
	var $uses = array();
	var $view = 'Theme';
	var $theme = 'compass';
    var $helpers = array('Cropimage');
    var $components = array('JqImgcrop'); 
	//var $layout = 'home';
	function index() {
	}
    function createimage_step(){
        if (!empty($this->data)) {
            $uploaded = $this->JqImgcrop->uploadImage($this->data['CropImage']['image'], '/img/upload/', 'prefix_');
            //debug($uploaded); exit;
            $this->set('uploaded',$uploaded);
        } 
    }
    function createimage_step3(){
        //debug($this->data); exit;
        $this->JqImgcrop->cropImage(151, $this->data['CropImage']['x1'], $this->data['CropImage']['y1'], $this->data['CropImage']['x2'], $this->data['CropImage']['y2'], $this->data['CropImage']['w'], $this->data['CropImage']['h'], $this->data['CropImage']['imagePath'], $this->data['CropImage']['imagePath']) ;
    }

}
?>